package cn.iocoder.yudao.module.movie.pojo;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.util.List;

/**
 * <p>  </p>
 */
@Getter
@Setter
@ToString
public class YouPiaoPiaoDTO<T> {

    @JsonProperty("data")
    @JSONField(name = "data")
    private T data;
    @JsonProperty("code")
    @JSONField(name = "code")
    @Schema(description = "0 是成功")
    private Integer code;
    @JsonProperty("message")
    @JSONField(name = "message")
    private String message;

    @Getter
    @Setter
    @ToString
    public static class Movies {
        @JsonProperty("movies")
        @JSONField(name = "movies")
        @Schema(description = "电影列表")
        private List<MoviesDTO> movies;
        @JsonProperty("count")
        @JSONField(name = "count")
        @Schema(description = "电影数量")
        private Integer count;
        @JsonProperty("sourceId")
        @JSONField(name = "sourceId")
        @Schema(description = "票源ID")
        private String sourceId;

    }
    @Getter
    @Setter
    @ToString
    @Schema(description = "电影基本信息")
    public static class MoviesDTO {
        @JsonProperty("description")
        @JSONField(name = "description")
        @Schema(description = "描述")
        private String description;
        @JsonProperty("duration")
        @JSONField(name = "duration")
        @Schema(description = "时长（分钟）")
        private Integer duration;
        @JsonProperty("movieId")
        @JSONField(name = "movieId")
        @Schema(description = "电影ID")
        private String movieId;
        @JsonProperty("movieCode")
        @JSONField(name = "movieCode")
        @Schema(description = "电影编号")
        private String movieCode;
        @JsonProperty("name")
        @JSONField(name = "name")
        @Schema(description = "电影名称")
        private String name;
        @JsonProperty("posterUrl")
        @JSONField(name = "posterUrl")
        @Schema(description = "海报URL")
        private String posterUrl;
        @JsonProperty("version")
        @JSONField(name = "version")
        @Schema(description = "版本（影片2D、3d类型，imax等）")
        private String version;
        @JsonProperty("isPreShow")
        @JSONField(name = "isPreShow")
        @Schema(description = "是否预售（是否可购买）")
        private Boolean isPreShow;
        @JsonProperty("isGlobalReleased")
        @JSONField(name = "isGlobalReleased")
        @Schema(description = "是否全球发行")
        private Boolean isGlobalReleased;
        @JsonProperty("score")
        @JSONField(name = "score")
        @Schema(description = "评分")
        private Integer score;
        @JsonProperty("wish")
        @JSONField(name = "wish")
        @Schema(description = "想看人数")
        private Integer wish;
        @JsonProperty("star")
        @JSONField(name = "star")
        @Schema(description = "主演")
        private String star;
        @JsonProperty("releaseTime")
        @JSONField(name = "releaseTime")
        @Schema(description = "上映时间")
        private String releaseTime;
        @JsonProperty("showInfo")
        @JSONField(name = "showInfo")
        @Schema(description = "上映信息")
        private String showInfo;
        @JsonProperty("comingTitle")
        @JSONField(name = "comingTitle")
        @Schema(description = "即将上映信息")
        private String comingTitle;
        @JsonProperty("showSt")
        @JSONField(name = "showSt")
        @Schema(description = "上映状态 1热映 2待映")
        private Integer showSt;
        @JsonProperty("category")
        @JSONField(name = "category")
        @Schema(description = "类别")
        private String category;
        @JsonProperty("director")
        @JSONField(name = "director")
        @Schema(description = "导演")
        private String director;
        @JsonProperty("easterEgg")
        @JSONField(name = "easterEgg")
        @Schema(description = "彩蛋")
        private String easterEgg;
    }

    @Getter
    @Setter
    @ToString
    @Schema(description = "影院列表")
    public static class Cinemas {
        @JsonProperty("dis")
        @JSONField(name = "dis")
        @Schema(description = "距离")
        private String dis;
        @JsonProperty("distance")
        @JSONField(name = "distance")
        @Schema(description = "影院距离")
        private Double distance;
        @JsonProperty("lat")
        @JSONField(name = "lat")
        @Schema(description = "影院所在的经度")
        private Double lat;
        @JsonProperty("lng")
        @JSONField(name = "lng")
        @Schema(description = "影院所在的纬度")
        private Double lng;
        @JsonProperty("halls")
        @JSONField(name = "halls")
        @Schema(description = "所含影厅标签(imax厅、杜比厅)")
        private List<String> halls;
        @JsonProperty("showInfo")
        @JSONField(name = "showInfo")
        @Schema(description = "排片信息")
        private String showInfo;
        @JsonProperty("cinemaId")
        @JSONField(name = "cinemaId")
        @Schema(description = "影院id")
        private String cinemaId;
        @JsonProperty("cinemaCode")
        @JSONField(name = "cinemaCode")
        @Schema(description = "影院编号")
        private String cinemaCode;
        @JsonProperty("cityId")
        @JSONField(name = "cityId")
        @Schema(description = "城市id")
        private String cityId;
        @JsonProperty("cityName")
        @JSONField(name = "cityName")
        @Schema(description = "城市名称")
        private String cityName;
        @JsonProperty("districtId")
        @JSONField(name = "districtId")
        @Schema(description = "区域id")
        private String districtId;
        @JsonProperty("name")
        @JSONField(name = "name")
        @Schema(description = "影院名称")
        private String name;
        @JsonProperty("address")
        @JSONField(name = "address")
        @Schema(description = "影院地址")
        private String address;
        @JsonProperty("phone")
        @JSONField(name = "phone")
        @Schema(description = "影院电话")
        private String phone;
        @JsonProperty("sellPrice")
        @JSONField(name = "sellPrice")
        @Schema(description = "影院售价")
        private String sellPrice;
        @JsonProperty("originPrice")
        @JSONField(name = "originPrice")
        @Schema(description = "影院原价")
        private Double originPrice;
        @JsonProperty("maxDiscount")
        @JSONField(name = "maxDiscount")
        @Schema(description = "最大优惠")
        private Double maxDiscount;
        @JsonProperty("cinemaLine")
        @JSONField(name = "cinemaLine")
        @Schema(description = "院线标识 是否是联排")
        private Boolean cinemaLine;
        @JsonProperty("areaName")
        @JSONField(name = "areaName")
        @Schema(description = "区域名称")
        private String areaName;
    }

    @Getter
    @Setter
    @ToString
    @Schema(description = "影院过滤列表")
    public static class CinemaFilter {
        @JsonProperty("brands")
        @JSONField(name = "brands")
        @Schema(description = "品牌-可选者过滤项")
        private BrandsDTO brands;
        @JsonProperty("district")
        @JSONField(name = "district")
        @Schema(description = "区域-可选者过滤项")
        private DistrictDTO district;

        @NoArgsConstructor
        @Data
        @Schema(description = "品牌")
        public static class BrandsDTO {
            @JsonProperty("name")
            @JSONField(name = "name")
            @Schema(description = "过滤项的名称：有品牌、区域和特色")
            private String name;
            @JsonProperty("subItems")
            @JSONField(name = "subItems")
            private List<SubItemsDTO> subItems;


        }

        @NoArgsConstructor
        @Data
        @Schema(description = "区域")
        public static class DistrictDTO {
            @JsonProperty("name")
            @JSONField(name = "name")
            @Schema(description = "过滤项的名称：有品牌、区域和特色")
            private String name;
            @JsonProperty("subItems")
            @JSONField(name = "subItems")
            private List<SubItemsDTO> subItems;
        }

        @NoArgsConstructor
        @Data
        @Schema(description = "子项")
        public static class SubItemsDTO {
            @JsonProperty("count")
            @JSONField(name = "count")
            @Schema(description = "数量")
            private Integer count;
            @JsonProperty("id")
            @JSONField(name = "id")
            @Schema(description = "id")
            private String id;
            @JsonProperty("name")
            @JSONField(name = "name")
            @Schema(description = "名称")
            private String name;
            @JsonProperty("subItems")
            @JSONField(name = "subItems")
            private SubItemsDTO subItems;
        }
    }

    @Getter
    @Setter
    @ToString
    @Schema(description = "城市列表")
    public static class City {
        @JsonProperty("name")
        @JSONField(name = "name")
        @Schema(description = "城市名称")
        private String name;
        @JsonProperty("cityId")
        @JSONField(name = "cityId")
        @Schema(description = "城市id")
        private String cityId;
        @JsonProperty("pinYin")
        @JSONField(name = "pinYin")
        @Schema(description = "城市pinYin")
        private String pinYin;
        @JsonProperty("letter")
        @JSONField(name = "letter")
        @Schema(description = "城市letter")
        private String letter;
        @JsonProperty("provinceId")
        @JSONField(name = "provinceId")
        @Schema(description = "城市provinceId")
        private String provinceId;
    }

    @Getter
    @Setter
    @ToString
    @Schema(description = "某个电影的排片列表")
    public static class CinemaShows {
        @JsonProperty("sourceId")
        @JSONField(name = "sourceId")
        @Schema(description = "源ID")
        private String sourceId;
        @JsonProperty("cinemaId")
        @JSONField(name = "cinemaId")
        @Schema(description = "影院ID")
        private String cinemaId;
        @JsonProperty("movieId")
        @JSONField(name = "movieId")
        @Schema(description = "电影ID")
        private String movieId;
        @JsonProperty("cinema")
        @JSONField(name = "cinema")
        @Schema(description = "影院信息")
        private Cinemas cinema;
        @JsonProperty("closeTime")
        @JSONField(name = "closeTime")
        @Schema(description = "优惠票关闭时间")
        private Integer closeTime;
        @JsonProperty("ticketTimeDesc")
        @JSONField(name = "ticketTimeDesc")
        @Schema(description = "出票时间描述")
        private String ticketTimeDesc;
        @JsonProperty("closeFastTicket")
        @JSONField(name = "closeFastTicket")
        @Schema(description = "是否关闭快速购票")
        private Boolean closeFastTicket;
        @JsonProperty("movieShows")
        @JSONField(name = "movieShows")
        private List<MovieShowsDTO> movieShows;


        @NoArgsConstructor
        @Data
        public static class MovieShowsDTO extends MoviesDTO {
            @JsonProperty("shows")
            @JSONField(name = "shows")
            @Schema(description = "场次列表")
            private List<ShowsDTO> shows;
            @JsonProperty("showCount")
            @JSONField(name = "showCount")
            @Schema(description = "场次数量")
            private Integer showCount;


            @NoArgsConstructor
            @Data
            public static class ShowsDTO {
                @JsonProperty("showDate")
                @JSONField(name = "showDate")
                @Schema(description = "排片日期的中文（今天4月10日）")
                private String showDate;
                @JsonProperty("date")
                @JSONField(name = "date")
                @Schema(description = "排片日期的数字（2019-04-10）")
                private String date;
                @JsonProperty("sessions")
                @JSONField(name = "sessions")
                @Schema(description = "场次列表")
                private List<SessionsDTO> sessions;
                @JsonProperty("hasShow")
                @JSONField(name = "hasShow")
                @Schema(description = "是否有场次")
                private Boolean hasShow;

                @NoArgsConstructor
                @Data
                public static class SessionsDTO {
                    @JsonProperty("seatSection")
                    @JSONField(name = "seatSection")
                    private Object seatSection;
                    @JsonProperty("sessionId")
                    @JSONField(name = "sessionId")
                    @Schema(description = "场次ID")
                    private String sessionId;
                    @JsonProperty("showTime")
                    @JSONField(name = "showTime")
                    @Schema(description = "场次时间")
                    private String showTime;
                    @JsonProperty("language")
                    @JSONField(name = "language")
                    @Schema(description = "语言")
                    private String language;
                    @JsonProperty("reservedMin")
                    @JSONField(name = "reservedMin")
                    @Schema(description = "预留分钟")
                    private Integer reservedMin;
                    @JsonProperty("sourcePrice")
                    @JSONField(name = "sourcePrice")
                    @Schema(description = "票商价格")
                    private Double sourcePrice;
                    @JsonProperty("originPrice")
                    @JSONField(name = "originPrice")
                    @Schema(description = "源价格")
                    private Double originPrice;
                    @JsonProperty("sellPrice")
                    @JSONField(name = "sellPrice")
                    @Schema(description = "经过匹配规则后的特惠票价格")
                    private Double sellPrice;
                    @JsonProperty("fastPrice")
                    @JSONField(name = "fastPrice")
                    @Schema(description = "快速购票价格")
                    private Double fastPrice;
                    @JsonProperty("hall")
                    @JSONField(name = "hall")
                    @Schema(description = "影厅")
                    private String hall;
                    @JsonProperty("ticketStatus")
                    @JSONField(name = "ticketStatus")
                    @Schema(description = "购票状态")
                    private String ticketStatus;
                    @JsonProperty("version")
                    @JSONField(name = "version")
                    @Schema(description = "版本")
                    private String version;
                    @JsonProperty("endTime")
                    @JSONField(name = "endTime")
                    @Schema(description = "结束时间")
                    private String endTime;
                    @JsonProperty("cinemaName")
                    @JSONField(name = "cinemaName")
                    @Schema(description = "影院名称")
                    private String cinemaName;
                    @JsonProperty("cinemaId")
                    @JSONField(name = "cinemaId")
                    private String cinemaId;
                    @JsonProperty("cinemaCode")
                    @JSONField(name = "cinemaCode")
                    private String cinemaCode;
                    @JsonProperty("movieName")
                    @JSONField(name = "movieName")
                    @Schema(description = "电影名称")
                    private String movieName;
                    @JsonProperty("movieId")
                    @JSONField(name = "movieId")
                    private String movieId;
                    @JsonProperty("movieCode")
                    @JSONField(name = "movieCode")
                    private String movieCode;
                    @JsonProperty("cityName")
                    @JSONField(name = "cityName")
                    private String cityName;
                    @JsonProperty("postImageUrl")
                    @JSONField(name = "postImageUrl")
                    private String postImageUrl;
                    @JsonProperty("cinemaAddress")
                    @JSONField(name = "cinemaAddress")
                    private String cinemaAddress;
                    @JsonProperty("priceRuleId")
                    @JSONField(name = "priceRuleId")
                    private String priceRuleId;
                    @JsonProperty("rtSeats")
                    @JSONField(name = "rtSeats")
                    private String rtSeats;
                    @JsonProperty("needRealName")
                    @JSONField(name = "needRealName")
                    private Integer needRealName;
                    @JsonProperty("areaPrice")
                    @JSONField(name = "areaPrice")
                    private String areaPrice;
                    @JsonProperty("areaPriceList")
                    @JSONField(name = "areaPriceList")
                    @Schema(description = "区域价格列表")
                    private List<AreaPriceListDTO> areaPriceList;
                    @JsonProperty("sourceId")
                    @JSONField(name = "sourceId")
                    private String sourceId;
                    @JsonProperty("closeFastTicket")
                    @JSONField(name = "closeFastTicket")
                    private Boolean closeFastTicket;

                    @NoArgsConstructor
                    @Data
                    public static class AreaPriceListDTO {
                        @JsonProperty("areaId")
                        @JSONField(name = "areaId")
                        @Schema(description = "区域ID")
                        private String areaId;
                        @JsonProperty("price")
                        @JSONField(name = "price")
                        @Schema(description = "销售价格")
                        private Double price;
                        @JsonProperty("fastPrice")
                        @JSONField(name = "fastPrice")
                        @Schema(description = "快速购票价格")
                        private Double fastPrice;
                        @JsonProperty("originPrice")
                        @JSONField(name = "originPrice")
                        @Schema(description = "源价格")
                        private Double originPrice;
                        @JsonProperty("sourcePrice")
                        @JSONField(name = "sourcePrice")
                        @Schema(description = "票商价格")
                        private Double sourcePrice;
                    }
                }
            }
        }


    }
    @NoArgsConstructor
    @Data
    public static class SeatSectionDTO {
        @JsonProperty("rowCount")
        @JSONField(name = "rowCount")
        @Schema(description = "行数")
        private Integer rowCount;
        @JsonProperty("columnCount")
        @JSONField(name = "columnCount")
        @Schema(description = "列数")
        private Integer columnCount;
        @JsonProperty("seatRows")
        @JSONField(name = "seatRows")
        @Schema(description = "座位行")
        private List<SeatRowsDTO> seatRows;

        @NoArgsConstructor
        @Data
        public static class SeatRowsDTO {
            @JsonProperty("rowsId")
            @JSONField(name = "rowsId")
            @Schema(description = "行ID")
            private String rowsId;
            @JsonProperty("rowsNum")
            @JSONField(name = "rowsNum")
            @Schema(description = "行号名称")
            private String rowsNum;
            @JsonProperty("columns")
            @JSONField(name = "columns")
            @Schema(description = "列")
            private List<ColumnsDTO> columns;

            @NoArgsConstructor
            @Data
            public static class ColumnsDTO {
                @JsonProperty("colId")
                @JSONField(name = "colId")
                @Schema(description = "列ID")
                private String colId;
                @JsonProperty("colNum")
                @JSONField(name = "colNum")
                @Schema(description = "列号名称")
                private String colNum;
                @JsonProperty("seatName")
                @JSONField(name = "seatName")
                @Schema(description = "座位名称")
                private String seatName;
                @JsonProperty("originSeatID")
                @JSONField(name = "originSeatID")
                @Schema(description = "座位原始ID(下单的时候用这个id)")
                private String originSeatID;
                @JsonProperty("state")
                @JSONField(name = "state")
                @Schema(description = "座位状态 0:Empty,非座位;\n" +
                        "\n" +
                        "1:CanBuy,可售;\n" +
                        "\n" +
                        "2:AlreadyBuy,已售;\n" +
                        "\n" +
                        "3:Select,已选;\n" +
                        "\n" +
                        "4:NotSale,不销售;\n" +
                        "\n" +
                        "10:LoveLeft,情侣座（左边）;\n" +
                        "\n" +
                        "11:LoveRight,情侣座(右边)")
                private Integer state;
                @JsonProperty("seatType")
                @JSONField(name = "seatType")
                @Schema(description = "座位类型 座位状态的枚举\n" +
                        "\n" +
                        "0:Empty,非座位;\n" +
                        "\n" +
                        "1:CanBuy,可售;\n" +
                        "\n" +
                        "2:AlreadyBuy,已售;\n" +
                        "\n" +
                        "3:Select,已选;\n" +
                        "\n" +
                        "4:NotSale,不销售;\n" +
                        "\n" +
                        "10:LoveLeft,情侣座（左边）;\n" +
                        "\n" +
                        "11:LoveRight,情侣座(右边);")
                private Integer seatType;
                @JsonProperty("type")
                @JSONField(name = "type")
                @Schema(description = "座位类型 座位状态的枚举 0:Empty,非座位（过道等);\n" +
                        "\n" +
                        "1:Normal,普通;\n" +
                        "\n" +
                        "2:LoveLeft,情侣座(左边);\n" +
                        "\n" +
                        "3:LoveRight,情侣座(右边);")
                private Integer type;
                @JsonProperty("areaId")
                @JSONField(name = "areaId")
                @Schema(description = "区域ID")
                private String areaId;
            }
        }
    }
    @NoArgsConstructor
    @Data
    @Schema(description = "获取电影的影院列表")
    public static class MovieCinemas {
        @JsonProperty("cinemas")
        @JSONField(name = "cinemas")
        @Schema(description = "影院列表")
        private List<Cinemas> cinemas;
        @JsonProperty("cinemaCount")
        @JSONField(name = "cinemaCount")
        private String cinemaCount;
        @JsonProperty("showDates")
        @JSONField(name = "showDates")
        private List<String> showDates;
        @JsonProperty("sort")
        @JSONField(name = "sort")
        private Integer sort;
        @JsonProperty("sortNames")
        @JSONField(name = "sortNames")
        private String sortNames;
        @JsonProperty("sourceId")
        @JSONField(name = "sourceId")
        private String sourceId;
    }
}
